Share the console route tree across hosts via TanStack virtual file routes - #954
Merged
Conversation
RhysSullivan
force-pushed
the
claude/console-route-contract
branch
2 times, most recently
from
June 11, 2026 22:38
0ea4fd0 to
4c7fa3a
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 9321b63 | Commit Preview URL Branch Preview URL |
Jun 11 2026, 11:12 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 9321b63 | Jun 11 2026, 11:14 PM |
RhysSullivan
force-pushed
the
claude/console-route-contract
branch
3 times, most recently
from
June 11, 2026 23:00
44ee726 to
a50c721
Compare
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
…outes
The shared console routes (integrations, policies, secrets, tools, resume,
plugins) were re-declared file-by-file in every app and drifted: this host
still registered /sources/* while the shared shell, command palette, and the
SDK's credential-handoff URLs all point at /integrations/*, so those links
landed on the router's not-found page.
packages/react now owns the contract it links to:
- src/routes/ holds the canonical route files, next to the pages they bind.
- consoleRoutes() (src/console-routes.ts) exposes them as virtual file route
nodes; an app's vite config composes them into its virtualRouteConfig,
keeping its own __root (the auth shell is what genuinely differs) and its
app-specific routes. Apps with an intentionally different surface for a
shared path exclude it and register their own file.
- The package registers its own generated console route tree
(console-router.ts + routes/routeTree.gen.ts, regenerated with
`bun run routes:gen`), so every Link/navigate in the shared pages and shell
typechecks against the contract instead of being a loose string.
host-cloudflare is the first consumer: its route dir shrinks to just __root,
the old /sources/* paths are dropped, and /integrations/* now resolves
(verified by driving the SPA in a browser against wrangler dev: integrations
detail/add render and unknown paths still 404). TanStack Start supports the
same composition via tanstackStart({ router: { virtualRouteConfig } }), so
cloud, host-selfhost, and packages/app can follow.
zod is pinned to exactly 4.3.6 in host-mcp, plugin-mcp, and test-servers:
the new dev dependencies make bun re-resolve those workspaces, which
otherwise drift to zod 4.4.x while the hoisted zod (shared with
@modelcontextprotocol/sdk) stays at 4.3.6 — mixed zod instances break the
SDK's schema typings. The exact pins keep every executor package on the
same instance the SDK uses.
RhysSullivan
force-pushed
the
claude/console-route-contract
branch
from
June 11, 2026 23:10
a50c721 to
9321b63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared console routes (integrations, policies, secrets, tools, resume, plugins) were re-declared file-by-file in every console app and drifted: the Cloudflare host still registered
/sources/*while the shared shell, command palette, and the SDK's credential-handoff URLs all point at/integrations/*— so on that host those links landed on the router's not-found page.This makes the route contract executable and typed, owned by the package that links to it:
packages/react/src/routes/holds the canonical route files, next to the pages they bind.consoleRoutes({ dir, exclude })exposes them as TanStack virtual file route nodes. An app's vite config composes them into itsvirtualRouteConfig, keeping its own__root(the auth shell is what genuinely differs per app) plus app-specific routes via aphysical()mount.excludeis for apps with an intentionally different surface for a shared path.console-router.ts, regenerated withbun run routes:gen), so everyLink/navigatein the shared pages and shell typechecks against the contract instead of being a loose string — a link to a nonexistent shared route is now a compile error in the package that owns it.host-cloudflare is the first consumer: its routes directory shrinks to just
__root.tsx, the old/sources/*paths are dropped, and/integrations/*now resolves. Verified by driving the built SPA in a browser againstwrangler dev: the integrations detail/add pages render and unknown paths still show not-found.One dependency note: zod is pinned to exactly 4.3.6 in host-mcp, plugin-mcp, and test-servers. The new dev dependencies make bun re-resolve those workspaces, which otherwise drift to zod 4.4.x while the hoisted zod (shared with @modelcontextprotocol/sdk) stays at 4.3.6 — and mixed zod instances break the SDK's schema typings. The pins keep every package on the instance the SDK uses.
TanStack Start supports the same composition (
tanstackStart({ router: { virtualRouteConfig } }), covered by an upstream e2e), so the remaining apps follow in the next PR.Stack